|
This page last changed on May 22, 2006 by jens@atlassian.com.
You need to edit in 'Wiki Markup' mode to include macros in your page.
The Contentbylabel macro lists content associated with specific labels.
Contentbylabel Macro
| What you need to type |
What you will get |
| {contentbylabel:documentation, my:stuff} |
|
By default, Confluence lists all the labels for each result displayed. See optional parameters below to disable this.
Optional Parameters
| No |
parameter |
Default |
Description |
| 1 |
key |
all |
Filter by space (Keywords @all and @self available with Confluence 2.2.2 and higher) |
| 2 |
type |
false |
Filter by content type |
| 3 |
showLabels |
true |
Show or hide labels for results |
| 4 |
showSpace |
true |
Show or hide spaces for results |
| 5 |
excerpt |
false |
Show or hide excerpts for results |
| 6 |
maxResults |
5 |
Specify maximum results to display |
| 7 |
sort=creation sort=title sort=modification |
recent |
The 'sort' attribute is an optional attribute that allows you to configure how the children are sorted. Use the 'reverse' attribute to optionally reverse the sorting. |
1. Filter by space
2. Show only results in current space (Confluence 2.2.2 and higher)
3. Show results from all spaces (Confluence 2.2.2 and higher)
4. Filter by content type: pages or blog posts
5. Hide labels for results
6. Hide spaces for results
7. Display excerpts for results
8. Specify the maximum number of results to display
9. Sort by creation date, modification date or title
RELATED TOPICS
Related Labels Macro
Navmap Macro
Recently Used Labels Macro
Working with Labels Overview
Working with Macros
Take me back to Confluence 2.0 Home
|
it appears that contentbylabel is limited to show max 5 entries - any way to change that value?

Posted by keepthebyte at Jan 13, 2006 04:58
|
|
There is an undocumented parameter: maxResults. Why the default is 5 is strange. The default should be all.

Posted by bob.swift@charter.net at Jan 13, 2006 07:55
|
|
Are there more undocumented parameters? I'm looking for a way to get a sorted result-list.
Error formatting macro: contentbylabel: java.lang.ClassCastException: com.atlassian.confluence.pages.Comment does work as it should, however, if i append |sort=title it won't. Any clues?

Posted by muellerj at Jan 13, 2006 09:36
|
|
Doesn't look like it. I should have said, not documented here. The notation guide shows the maxresults parameter.

Posted by bob.swift@charter.net at Jan 13, 2006 10:20
|
|
If you want more options, such as those found on the {children} macro, please vote for this JIRA issue and add any additional parameters that are required: http://jira.atlassian.com/browse/CONF-5137

Posted by gfraser at Jan 14, 2006 09:59
|
|
Bob,
Thanks for pointing that out. I have included it now.
Cheers,
Vidya

Posted by vidya at Jan 15, 2006 16:35
|
|
Is there hidden option to filter by multiple labels? blog-posts macro has "match-labels=all" option, but from some reason blog-posts won't work if page is included, but this macro works.

Posted by ajevic at Feb 06, 2006 06:32
|
|